struct Drop1;
struct Drop2;

impl Drop for Drop1 {
    fn drop(&mut self) {
        println!("dropping drop1");
    }
}

impl Drop for Drop2 {
    fn drop(&mut self) {
        println!("dropping drop2");
    }
}

struct HasTwoDrop {
    one: Drop1,
    two: Drop2,
}

impl Drop for HasTwoDrop {
    fn drop(&mut self) {
        println!("dropping hastwodrop");
    }
}

struct Foo;
impl Drop for Foo {
    fn drop(&mut self) {
        println!("dropping foo");
    }
} 

fn main() {
    println!("start...");

    let _h = HasTwoDrop {
        one: Drop1,
        two: Drop2,
    };

    let _foo = Foo;
    println!("end...");
}
